package com.aaa.project.controller;


import com.aaa.project.service.IEEmpInfoService;
import com.aaa.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * <p>
 * 管理员信息表 前端控制器
 * </p>
 *
 * @author yuyongli
 * @since 2023-01-03
 */
@RestController
@RequestMapping("/e-emp-info")
public class EEmpInfoController {

    @Autowired
    private IEEmpInfoService empInfoService;
    @RequestMapping("updatePassword/{oldPassword}/{newPassword}")
    public Result updatePassword(@PathVariable String oldPassword, @PathVariable String newPassword, Principal principal)  {
        return new Result(empInfoService.updatePassword(oldPassword, newPassword, principal));
    }
}

